<template>
	<div>
		<div v-show="root==1 || root==3">
			<finance2></finance2>
		</div>
		<div v-show="root == 2">
			<common></common>
		</div>
	</div>
</template>

<script>
	import common from '../People/common.vue'
	import finance2 from './finance2.vue'
	export default {
		name: 'finanace3',
		data() {
			return {
				username: '',
				root: '',
			}
		},
		components: {
			common,
			finance2
		},
		methods: {
			getusername() {
				this.username = this.$route.params.username;
				
				var url = "http://localhost:8848/superuser/serchroot?username="+this.username;
				
				this.$axios.get(url) 
					.then( (resp) => {
						var u = resp.data;
						
						this.root = u;
						console.log(this.root);
					})
					.catch( (err) => {
						console.log("error=", err);
					})
			},
		},
		created() {
			this.getusername();
		}
	}
</script>

<style>
</style>
